@import '../../assets/css/_variable.less';

@slider-height: 4px;
@slider-br: 2px;

.slider-box {
  &.disabled {
    user-select: none;

    .slider-label,
    .mark-box span {
      color: #999;
    }

    .slider-runway,
    input,
    .slider-dot-box {
      cursor: not-allowed;
    }

    .slider-runway {
      background: #999;

      &:hover {
        background: #999;
      }

      .slider-bar {
        background: #999;
      }

      .slider-dot {
        background: #666;
        border: 2px solid #999;
      }
    }

    input {
      background: #999;
      border: 1px solid #999;
    }
  }

  .slider-label {
    margin-bottom: 5px;
    color: var(--aibox-color);
    font-size: 14px;
  }

  .slider-cont {
    display: flex;
  }

  // main
  .slider-main {
    flex: 1;
    margin-top: 8px;
  }

  // runway
  .slider-runway {
    position: relative;
    width: 100%;
    height: @slider-height;
    background: rgba(220, 222, 224, 0.8); // #dcdee0;
    border-radius: @slider-br;
    cursor: pointer;

    &:hover {
      background: #dcdee0;
    }
  }

  .slider-bar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 0;
    height: @slider-height;
    margin-left: -0.5px;
    background: var(--aibox-bg2);
    border-radius: @slider-br 0 0 @slider-br;
  }

  .slider-dot-box {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 2;
    padding: 10px;
    transform: translate(-50%, -50%);
    cursor: grab;
    user-select: none;

    .slider-dot {
      width: 16px;
      height: 16px;
      background: #fff;
      border: 2px solid var(--aibox-bg2);
      border-radius: 50%;

      &.on {
        outline: none;
        box-shadow: 0 0 0 4px rgba(35, 120, 222, 0.32);
        transition: box-shadow 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28);
      }
    }
  }

  // mark
  .mark-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;

    span {
      color: var(--aibox-color);
      font-size: 14px;
    }

    .m-left {
      transform: translate(-50%, 0);
    }

    .m-right {
      transform: translate(50%, 0);
    }
  }

  // input
  input {
    display: inline-block;
    width: 60px;
    min-width: 0;
    height: 34px;
    margin: 8px 0 0 25px;
    padding: 0 10px;
    color: #323233;
    font-size: 14px;
    background: #fff;
    border: 1px solid #c8c9cc;
    border-radius: 2px;
    transform: translate(0, -50%);
  }
}
